package com.wang.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wang.domain.Medicine;
import com.wang.model.Medicine.MedicineSelectVM;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author WangZai
 * @since 2023-05-07
 */
public interface MedicineService extends IService<Medicine> {
    boolean addMedicine(Medicine medicine);

    boolean deleteMedicineById(Integer id);

    boolean deleteMedicineByLargeCategoryId(Integer largeCategoryId);

    boolean deleteMedicineBySmallCategoryId(Integer smallCategoryId);



    /**
     * 条件查询药品表
     * @param model
     * @return
     */
    List<Medicine> conditionSelect(MedicineSelectVM model);

    List<Medicine> getListBySmallCategoryId(Integer smallCategoryId);

    List<Medicine> getListBySmallCategoryIdAndDimName(Integer smallCategoryId,String medicineName);

    List<Medicine> getList();

    Medicine getMedicineByName(String medicineName);

    Medicine getMedicineById(Integer medicineId);

    boolean updateMedicine(Medicine medicine);
}
